package com.shuyuansystem.service;

import com.shuyuansystem.entity.Result;
import com.shuyuansystem.pojo.ShoppingCart;
import com.shuyuansystem.utils.PageResult;
import com.shuyuansystem.utils.QueryPageBean;

import java.util.List;
import java.util.Map;

public interface OrderService {


    // 加入购物车
    Result addShoppingcart(ShoppingCart shoppingCart);

    Result reduceShoppingCart(ShoppingCart shoppingCart);

    Integer getShoppingCartQuantity(ShoppingCart shoppingCart);
    PageResult<ShoppingCart> getProductInfoByPage(QueryPageBean queryPageBean);
    // 新增方法声明
    Integer getProductIdByName(String productName);
    public void synchronizeOrderListWithShoppingCart(Integer userId);

    List<ShoppingCart> getShoppingCartProductIdsByUserId(String userId);

    List<Map<String, Object>> getMerchantIdsByProductIds(List<Integer> productIds);

    List<Map<String, Object>> getProductNamesByProductIds(List<Integer> productIds);

    List<Map<String, Object>> getMerchantIdAndProductNameFromOrderList();

    int deleteOrdersByMerchantAndProduct(List<Map<String, Object>> differenceList);

}